﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using  HA .ModFlow.Domain .DomainLayer  ;
namespace HA.ModFlow.Controls.Windows
{
    /// <summary>
    /// winOutputControl.xaml 的交互逻辑
    /// </summary>
    public partial class winOutputControl : Window
    {
        public winOutputControl(  OutputControl Output)
        {
            InitializeComponent();
            this.mOutput = Output;
        }
        private OutputControl mOutput;
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            this.DataContext = mOutput;
            if (mOutput.IsAllStepOutput)
            {
                this.chkStep.IsChecked = true;
            }
            else
            {
                this.chkLastStep.IsChecked = true;
            }
        }

        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            if (this.chkStep.IsChecked.Value )
            {
                mOutput.IsAllStepOutput = true;
            }
            else
            {
                mOutput.IsAllStepOutput = false ;
            }

            this.DialogResult = true;
            this.Close();
        }

        private void btnCancal_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
